/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Einkaufer;


import java.util.ArrayList;

import javax.swing.table.AbstractTableModel;

/**
 *
 * @author Florian
 */
public class KonfigurationTableModel extends AbstractTableModel {

	
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String[] column = new String [] {"ID", "Art", "Lieferzeit (Tage)", "Anzahl", "Slots pro Teil"};
	private ArrayList<ArrayList<KonfigurationList>> konfigurationarray = new ArrayList<ArrayList<KonfigurationList>>();

	@Override
	public int getColumnCount() {
		
		return column.length;
	}
	
	@Override
	public String getColumnName(int column){
	
		return this.column[column];
	}

	@Override
	public int getRowCount() {
		//System.out.println(test.size());
		return konfigurationarray.size();
	}

	@Override
	public Object getValueAt(int column, int row) {
			
		return konfigurationarray.get(column).get(row);
		
	}
	
	public void setValueAt(ArrayList<KonfigurationList> e) {
		
		konfigurationarray.add(e);
		
		
	}
	
	
	
   

}
